package ServerStuff;

import java.io.IOException;
import java.net.HttpURLConnection;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import Database.DatabaseConnector;

/**
 * Servlet implementation class SubLogoutServlet
 */
@WebServlet("/SubLogoutServlet")
public class SubLogoutServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		System.out.println("In logout to servlet");
		HttpSession session = request.getSession();
		 
		session.setAttribute("subloggedIn", false);
		response.setStatus(HttpURLConnection.HTTP_ACCEPTED);
	}
}
